<?php
header("Content-Type:text/html;charset=utf-8");//防止网页中文乱码
 require'db_con.php';
 $id=isset($_GET['id']) ? $_GET['id']:0;
 $sql="delete from tb_note where id='$id'";
 $rs=$db->query($sql);
 if ($rs==true)
 {
     echo "<script language='javascript' type='text/javascript'>";
     echo "alert('删除成功!');";
     echo "window.location.href='index.php';";
     echo "</script>";
     exit;
 }
 else{
      echo "<script language='javascript' type='text/javascript'>";
     echo "alert('删除失败!');";
     echo "window.location.href='index.php';";
     echo "</script>";
     exit;
 }

